import axios from '@/api/fetch';
//import * as types from './types';
import SERVER from '@/api/server';



// 销售订单查询--PC
export const salesOrders = params => axios.get(`${SERVER.CYXDMS_RETAIL}/ordermanage/salesOrders`, { params });

// 根据id查询销售订单--PC/APP
export const idQueryOrders = (id, params) => axios.get(`${SERVER.CYXDMS_RETAIL}/ordermanage/salesOrders/${id}`, params );

// 销售订单导出--PC
// export const exportOrders = params => axios.get(`${SERVER.CYXDMS_RETAIL}/ordermanage/salesOrders/export/excel`, {params}, {responseType:'blob'} );
export const exportOrders = params => {
  return axios({
      url:`${SERVER.CYXDMS_RETAIL}/ordermanage/salesOrders/export/excel`,
      method:'get',
      params:params,
      responseType: 'blob'
  });
};

// 取消
export const putSalesOrders = params => axios.put(`${SERVER.CYXDMS_RETAIL}/ordermanage/salesOrders/cancelSalesOrderVin/${params.soVinId}`, params );


